<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="d" uri="http://dgg.net/jsp/jstl/core" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>跟进中明细列表数据</title>
    <c:import url="../../header.jsp"/>
</head>
<body>
<div class="content-warp">
        <div class="screen-tab-warp">
            <ul class="screen-tab">
                <li class="active tab-switch"  data-target="DYDK"><a href="javascript:void(0)">抵押贷款</a></li>
                <li class="tab-switch" data-target="XYDK"><a href="javascript:void(0)">信用贷款</a></li>
                <li class="tab-switch" data-target="ZJYW"><a href="javascript:void(0)">资金业务</a></li>
            </ul>
        </div>
        <div id="processingDetatil"></div>
</div>
</div>
<c:import url="../../footer.jsp"/>
<script>
    var processingOrder = {
        "list":sysInfo.basePath+"/rzsc/detatil/processing_detatil_data.do",//分页数据
        "loanOnMortgage":sysInfo.basePath+"/rzsc/detatil/loan_on_mortgage.html",
        "loanOnCredit":sysInfo.basePath+"/rzsc/detatil/loan_on_credit.html",
        "capitalBusiness":sysInfo.basePath+"/rzsc/detatil/capital_business.html",
    };
    var checkparam;
    var tables;

    dggui.use(['table', 'select2','distpicker','dggdate','droptree'], function (){
        var table = dggui.table;
        var select2 = dggui.select2;
        var distpicker=dggui.distpicker;
        var dggdate = dggui.dggdate;
        var droptree = dggui.droptree;

        loanOnMortgage();

        // console.log($(".active").attr("data-target"));
        $(".tab-switch").click(function () {
            var target = $(this).attr("data-target");
            $(".tab-switch").each(function () {
                if (target == $(this).attr("data-target")) {
                    $(this).addClass("active");
                } else {
                    $(this).removeClass("active");
                }
            });
            switch ($(".active").attr("data-target")) {
                case "XYDK":
                    dggui.dialog.loading();
                    loanOnCredit();
                    break;
                case "DYDK":
                    dggui.dialog.loading();
                    loanOnMortgage();
                    break;
                case "ZJYW":
                    dggui.dialog.loading();
                    capitalBusiness();
                    break;
                default:
                    dggui.dialog.loading();
                    loanOnMortgage();
                    break;
            }
        })

        //信用贷款
        function  loanOnCredit() {
            $.ajax({
                url: processingOrder.loanOnCredit,
                dataType: 'html',
                success: function (html) {
                    dggui.dialog.loading('close');
                    $("#processingDetatil").html(html);

                    //初始化流程人员
                    initUser("RZSC_FLOW_USER", "role", "#flowUserId");
                    select2.render({
                        placeholder: "请选择",
                        allowClear: true,
                        elem: $('#flowUserId'),
                        width: "160px"
                    });
                    //初始化放款时间
                    dggdate.render({
                        elem: '#receiveOrderDate',
                        type: 'date',
                        range: '~', //或 range: '~' 来自定义分割字符
                    });

                    queryAllDep("#flowUserDep");
                    var opt={
                        "elem":"#loanOnCredit",
                        "ajax": processingOrder.list,
                        "scrollX": "true",//是否开启横项滚动
                        "switchStatus": "loanOnCredit",
                        "fnServerParams": function (aoData) {
                            //搜索条件
                            aoData = $.extend(aoData, {
                                    target:$(".active").attr("data-target"),
                                    flowUserDep: $("#flowUserDep").attr("data-id"),
                                    flowUserId: $("#flowUserId").val(),
                                    receiveOrderDate: $("#receiveOrderDate").val()
                            }
                            )
                            return aoData;
                        },
                        "aoColumns": [ {
                            'title': '序号',
                            "orderable": false,
                            "render": function(data, type, full, meta) {
                                return meta.row + 1;
                            }
                        },
                            {
                                'title': '接单日期',
                                'data': "receiveOrderDate",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render"><b>'+data ? data : ''+'<b></div>';
                                    return htm;
                                }
                            },
                            {
                                "title": "流程人员",
                                "orderable": false,
                                "data": "flowUserName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '流程人员部门',
                                "orderable": false,
                                'data': "flowUserOrgName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render"><b>'+data ? data : ''+'<b></div>';
                                    return htm;
                                }
                            }, {
                                'title': '当前完成节点',
                                "orderable": false,
                                'data': "latestEndNodeName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                "title":"客户姓名",
                                "orderable": false,
                                "data": "customerName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '签单商务',
                                "orderable": false,
                                'data': "signUserName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },

                            {
                                'title': '签单人部门',
                                'data': "signUserOrgName",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '生产所属事业部',
                                'data': "productOrgName",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '生产单号',
                                'data': "scProductOrderNo",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '业务类型',
                                "orderable": false,
                                'data': "businessProductName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '产品名称',
                                "orderable": false,
                                'data': "productName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '商品属性',
                                "orderable": false,
                                'data': "goodsName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '渠道',
                                "orderable": false,
                                'data': "channelName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '需求金额',
                                "orderable": false,
                                'data': "loanAmount",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },{
                                'title': '合同编号',
                                "orderable": false,
                                'data': "contractNo",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },{
                                'title': '完善资料日期',
                                "orderable": false,
                                'data': "complateDateTime",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },{
                                'title': '报审日期',
                                "orderable": false,
                                'data':"reportTime",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '通过时间',
                                'data': "approveTime",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '通过金额（元）',
                                'data': "approveMoney",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            }
                        ]
                    };
                    tables=table.render(opt);
                    $('.searchBtn').click(function (){
                        tables.ajax.reload();
                    });

                    // 处理dataTable 异常错误信息
                    $.fn.dataTable.ext.errMode = 'none';//不抛出异常
                    tables.on( 'error.dt', function ( e, settings, techNote, message ) {
                        //dggui.dialog.errors("表格查询错误，请联系管理员", 2000);
                        if(checkEmpty(settings.jqXHR.responseJSON.error)){dggui.dialog.errors(settings.jqXHR.responseJSON.error, 2000);}
                    });
                }
            });
        }
        //抵押贷款
        function loanOnMortgage() {
            $.ajax({
                url: processingOrder.loanOnMortgage,
                dataType: 'html',
                success: function (html) {
                    dggui.dialog.loading('close');
                    $("#processingDetatil").html(html);

                    //初始化流程人员
                    initUser("RZSC_FLOW_USER", "role", "#flowUserId");
                    select2.render({
                        placeholder: "请选择",
                        allowClear: true,
                        elem: $('#flowUserId'),
                        width: "160px"
                    });
                    //初始化放款时间
                    dggdate.render({
                        elem: '#receiveOrderDate',
                        type: 'date',
                        range: '~', //或 range: '~' 来自定义分割字符
                    });

                    queryAllDep("#flowUserDep");
                    var opt={
                        "elem":"#loanOnMortgage",
                        "ajax": processingOrder.list,
                        "scrollX": "true",//是否开启横项滚动
                        "switchStatus": "loanOnMortgage",
                        "fnServerParams": function (aoData) {
                            //搜索条件
                            aoData = $.extend(aoData, {
                                    target:$(".active").attr("data-target"),
                                    flowUserDep: $("#flowUserDep").attr("data-id"),
                                    flowUserId: $("#flowUserId").val(),
                                    receiveOrderDate: $("#receiveOrderDate").val()
                                }
                            )
                            return aoData;
                        },
                        "aoColumns": [ {
                            'title': '序号',
                            "orderable": false,
                            "render": function(data, type, full, meta) {
                                return meta.row + 1;
                            }
                        },
                            {
                                'title': '接单日期',
                                'data': "receiveOrderDate",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render"><b>'+data ? data : ''+'<b></div>';
                                    return htm;
                                }
                            },
                            {
                                "title": "流程人员",
                                "orderable": false,
                                "data": "flowUserName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '流程人员部门',
                                "orderable": false,
                                'data': "flowUserOrgName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render"><b>'+data ? data : ''+'<b></div>';
                                    return htm;
                                }
                            }, {
                                'title': '当前完成节点',
                                "orderable": false,
                                'data': "latestEndNodeName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                "title":"客户姓名",
                                "orderable": false,
                                "data": "customerName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '签单商务',
                                "orderable": false,
                                'data': "signUserName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },

                            {
                                'title': '签单人部门',
                                'data': "signUserOrgName",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '生产所属事业部',
                                'data': "productOrgName",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '生产单号',
                                'data': "scProductOrderNo",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '业务类型',
                                "orderable": false,
                                'data': "businessProductName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '产品名称',
                                "orderable": false,
                                'data': "productName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '商品属性',
                                "orderable": false,
                                'data': "goodsName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '渠道',
                                "orderable": false,
                                'data': "channelName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },

                            {
                                'title': '产权性质',
                                "orderable": false,
                                'data': "interestType",
                                "render": function(data, type, row, meta) {
                                    var interestType = interestTypeTranslate(data);
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+interestType+'"><span >' +interestType ? interestType : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },{
                                'title': '地址',
                                "orderable": false,
                                'data': "address",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },{
                                'title': '面积',
                                "orderable": false,
                                'data': "area",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },{
                                'title': '评估公司',
                                "orderable": false,
                                'data':"escrowCompany",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '评估价格',
                                'data': "appraisalCost",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '征信',
                                'data': "credit",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '申请贷款金额（元）',
                                'data': "appliedAmount",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '签申请时间',
                                'data': "applicationTime",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var dataFormat
                                    if (checkEmpty(data)) {
                                         dataFormat= new Date(data).format("yyyy-MM-dd");
                                    }else {
                                        dataFormat='';
                                    }
                                    return dataFormat ? dataFormat : '';
                                }
                            },
                            {
                                'title': '报审时间',
                                'data': "reportTime",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var dataFormat
                                    if (checkEmpty(data)) {
                                        dataFormat= new Date(data).format("yyyy-MM-dd");
                                    }else {
                                        dataFormat='';
                                    }
                                    return dataFormat ? dataFormat : '';
                                }
                            },
                            {
                                'title': '通过时间',
                                'data': "approveTime",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var dataFormat
                                    if (checkEmpty(data)) {
                                        dataFormat= new Date(data).format("yyyy-MM-dd");
                                    }else {
                                        dataFormat='';
                                    }
                                    return dataFormat ? dataFormat : '';
                                }
                            },
                            {
                                'title': '通过金额',
                                'data': "approveMoney",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '按揭/全款',
                                'data': "refundType",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var refundType = refundTypeTranslate(data);
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+refundType+'"><span >' +refundType ? refundType : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '取他权时间',
                                'data': "takeHisTime",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var dataFormat
                                    if (checkEmpty(data)) {
                                        dataFormat= new Date(data).format("yyyy-MM-dd");
                                    }else {
                                        dataFormat='';
                                    }
                                    return dataFormat ? dataFormat : '';
                                }
                            },
                            {
                                'title': '办抵押时间',
                                'data': "mortgageTime",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var dataFormat
                                    if (checkEmpty(data)) {
                                        dataFormat= new Date(data).format("yyyy-MM-dd");
                                    }else {
                                        dataFormat='';
                                    }
                                    return dataFormat ? dataFormat : '';
                                }
                            },
                        ]
                    };
                    tables=table.render(opt);
                    $('.searchBtn').click(function (){
                        tables.ajax.reload();
                    });

                    // 处理dataTable 异常错误信息
                    $.fn.dataTable.ext.errMode = 'none';//不抛出异常
                    tables.on( 'error.dt', function ( e, settings, techNote, message ) {
                        //dggui.dialog.errors("表格查询错误，请联系管理员", 2000);
                       if(checkEmpty(settings.jqXHR.responseJSON.error)){dggui.dialog.errors(settings.jqXHR.responseJSON.error, 2000);}
                    });
                }
            });
        }
        //资金业务
        function capitalBusiness() {
            $.ajax({
                url: processingOrder.capitalBusiness,
                dataType: 'html',
                success: function (html) {
                    dggui.dialog.loading('close');

                    $("#processingDetatil").html(html);
                    //初始化流程人员
                    initUser("RZSC_FLOW_USER", "role", "#flowUserId");
                    select2.render({
                        placeholder: "请选择",
                        allowClear: true,
                        elem: $('#flowUserId'),
                        width: "160px"
                    });
                    //初始化放款时间
                    dggdate.render({
                        elem: '#receiveOrderDate',
                        type: 'date',
                        range: '~', //或 range: '~' 来自定义分割字符
                    });

                    queryAllDep("#flowUserDep");

                    var opt={
                        "elem":"#capitalBusiness",
                        "ajax": processingOrder.list,
                        "scrollX": "true",//是否开启横项滚动
                        "switchStatus": "capitalBusiness",
                        "fnServerParams": function (aoData) {

                            //搜索条件
                            aoData = $.extend(aoData, {
                                target:$(".active").attr("data-target"),
                                flowUserDep: $("#flowUserDep").attr("data-id"),
                                flowUserId: $("#flowUserId").val(),
                                receiveOrderDate: $("#receiveOrderDate").val(),
                                }
                            )
                            return aoData;
                        },
                        "aoColumns": [ {
                            'title': '序号',
                            "orderable": false,
                            "render": function(data, type, full, meta) {
                                return meta.row + 1;
                            }
                        },
                            {
                                'title': '接单日期',
                                'data': "receiveOrderDate",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render"><b>'+data ? data : ''+'<b></div>';
                                    return htm;
                                }
                            },
                            {
                                "title": "流程人员",
                                "orderable": false,
                                "data": "flowUserName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '流程人员部门',
                                "orderable": false,
                                'data': "flowUserOrgName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render"><b>'+data ? data : ''+'<b></div>';
                                    return htm;
                                }
                            }, {
                                'title': '当前完成节点',
                                "orderable": false,
                                'data': "latestEndNodeName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                "title":"客户姓名",
                                "orderable": false,
                                "data": "customerName",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '签单商务',
                                "orderable": false,
                                'data': "signUserName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },

                            {
                                'title': '签单人部门',
                                'data': "signUserOrgName",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '生产所属事业部',
                                'data': "productOrgName",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },
                            {
                                'title': '生产单号',
                                'data': "scProductOrderNo",
                                "orderable": false,
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '业务类型',
                                "orderable": false,
                                'data': "businessProductName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '产品名称',
                                "orderable": false,
                                'data': "productName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '商品属性',
                                "orderable": false,
                                'data': "goodsName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '渠道',
                                "orderable": false,
                                'data': "channelName",
                                "render": function(data, type, row, meta) {
                                    return data ? data : '';
                                }
                            },
                            {
                                'title': '需求金额',
                                "orderable": false,
                                'data': "loanAmount",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            },{
                                'title': '合同编号',
                                "orderable": false,
                                'data': "contractNo",
                                "render": function(data, type, row, meta) {
                                    var htm = '<div class="order-render">' +
                                    '<p class="line1" title="'+data+'"><span >' +data ? data : '' + '</span></p>'+
                                        '</div>'
                                    return htm;
                                }
                            }
                        ]
                    };
                    tables=table.render(opt);
                    $('.searchBtn').click(function (){

                        tables.ajax.reload();
                    });

                    // 处理dataTable 异常错误信息
                    $.fn.dataTable.ext.errMode = 'none';//不抛出异常
                    tables.on( 'error.dt', function ( e, settings, techNote, message ) {
                        //dggui.dialog.errors("表格查询错误，请联系管理员", 2000);
                       if(checkEmpty(settings.jqXHR.responseJSON.error)){dggui.dialog.errors(settings.jqXHR.responseJSON.error, 2000);}
                    });
                }
            });
        }

    });

    function excelExportProcessingDetailed(url) {
        var obj = new Object();
        obj.target=$(".active").attr("data-target"),
        obj.flowUserDep= $("#flowUserDep").attr("data-id");
        obj.flowUserId= $("#flowUserId").val();
        obj.typeCode=$("#typeCode .plug-in-code").val();
        obj.receiveOrderDate=$("#receiveOrderDate").val();
        formSubmit(url, obj);
    };




</script>
</body>
</body>
</html>